{% if photo %}
<a title="{{ photo.title }}" href="{{ photo.get_absolute_url }}"><img src="{{ photo.get_thumbnail_url }}" class="{% block img-class %}{% endblock %}" /></a>
{% endif %}